package cn.itcast.tanhua.dubbo.server.api;

import cn.itcast.tanhua.dubbo.server.pojo.Video;
import cn.itcast.tanhua.dubbo.server.vo.PageInfo;

/**
    *@ClassName VideoApi
    *@Description 小视频接口类
    *@Author Mr.Tan
    *@Date 2021/6/4 18:40
    *@Version 1.0
    */
public interface VideoApi {
    /**
     * //保存小视频，保存成功后，返回id
     *
     * @Param video
     * @return java.lang.String
     */
    String saveVideo(Video video);

    /**
     * 分页查询小视频
     *
     * @Param userId
     * @param: page
     * @param: pageSize
     * @return cn.itcast.tanhua.dubbo.server.vo.PageInfo<cn.itcast.tanhua.dubbo.server.pojo.Video>
     */
    PageInfo<Video> queryVideoList(Long userId,Integer page,Integer pageSize);

    /**
     * 根据id查询单个视频
     *
     * @param publishId
     * @return cn.itcast.tanhua.dubbo.server.pojo.Video
     */
    Video queryVideoById(String publishId);

    /**
     * 关注用户
     *
     * @param userId 用户的id
     * @param followUserId 被关注的用户id
     * @return
     */
    Boolean followUser(Long userId, Long followUserId);

    /**
     * 取消关注
     *
     * @param userId
     * @param followUserId
     * @return
     */
    Boolean disFollowUser(Long userId, Long followUserId);

    /**
     * 判断用户是否关注某用户
     *
     * @param userId
     * @param followUserId
     * @return
     */
    Boolean isFollowUser(Long userId, Long followUserId);
}
